Skip to content

Hotfix/contentful - Taxonomy Support Added#1042

Merged
umeshmore45 merged 64 commits into
devfrom
hotfix/contentful
Jun 2, 2026
Merged

Hotfix/contentful - Taxonomy Support Added#1042
umeshmore45 merged 64 commits into
devfrom
hotfix/contentful

Conversation

@shobhit-cstk
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds end-to-end taxonomy support for Contentful migrations (schema extraction, mapper transport, taxonomy file generation, and entry assignment), along with some Content Mapper UI mapping fixes and dependency updates.

Changes:

  • Extract Contentful taxonomy schemes from export metadata and include them in mapper payloads.
  • Generate taxonomy vocabularies/terms from Contentful exports in the API and assign entry taxonomy values from metadata.concepts.
  • Improve Content Mapper UI matching for nested modular blocks and adjust a few config/dependency files.

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
upload-api/src/services/contentful/index.ts Calls taxonomy extraction and includes taxonomies in mapper POST payload.
upload-api/src/config/index.ts Updates default localPath placeholder.
upload-api/migration-contentful/libs/extractTaxonomy.js New extractor that writes taxonomySchema.json from Contentful export metadata.taxonomy.
upload-api/migration-contentful/libs/createInitialMapper.js Adds taxonomy field rows to initial mapper based on content type metadata.taxonomy.
upload-api/migration-contentful/index.js Exports extractTaxonomy from the migration library.
upload-api/migration-aem/package-lock.json Locks additional Node typings dependencies.
ui/src/components/ContentMapper/index.tsx Refactors and extends matching logic for saved mappings against modular blocks nesting.
app.json Updates app metadata and auth configuration values (currently includes real-looking identifiers).
api/src/utils/content-type-creator.utils.ts Normalizes taxonomy UIDs and adjusts taxonomy field schema creation/merge behavior.
api/src/services/migration.service.ts Invokes Contentful taxonomy generation before creating entries (test + prod flows).
api/src/services/contentful/taxonomy.service.ts New service to derive taxonomies/terms from Contentful export and write taxonomy files.
api/src/services/contentful.service.ts Assigns taxonomy field values to entries based on metadata.concepts, and exposes createTaxonomy.
api/src/services/contentMapper.service.ts Adds a fallback path to discover Contentful taxonomies from upload-api generated files.
api/package.json Reorders/adds dependencies (incl. @emnapi/*).
api/package-lock.json Updates many locked dependency versions (incl. Node engine requirements for undici).
Files not reviewed (2)
  • api/package-lock.json: Language not supported
  • upload-api/migration-aem/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app.json Outdated
Comment thread api/src/services/contentful.service.ts Outdated
Comment thread api/src/services/migration.service.ts
Comment thread api/src/services/migration.service.ts
Comment thread api/package-lock.json Outdated
Comment thread upload-api/src/services/contentful/index.ts
…nfig

- Extract and map Contentful taxonomies from export; upload-api and mapper integration
- Contentful service: field/widget helpers, taxonomy metadata locale resolution (mapper + sys.locale)
- API: Vitest thresholds; migration and user unit tests (SSO, createTaxonomy mocks)
- app.json placeholder updates and related fixes
aishwarya-cstk and others added 18 commits June 1, 2026 12:38
…prove optional chaining in AdvancePropertise and ContentMapper components
…r better handling of missing and media blocks
…aveChangesModal with async handling for step changes"

This reverts commit fe3bfed.
…iple package.json and package-lock.json files
…ng and jetpack/story support

- Added `unwrapSingleChildGroup` function to simplify processing of core/group blocks with a single inner block.
- Updated `createSchema` to utilize the new function for better handling of nested structures.
- Enhanced `schemaMapper` to support jetpack/story blocks, mapping them to a repeatable group with title, alt, caption, and image fields.
- Improved unit tests to validate new functionality for single-child groups and jetpack/story mappings.
…nfig

- Extract and map Contentful taxonomies from export; upload-api and mapper integration
- Contentful service: field/widget helpers, taxonomy metadata locale resolution (mapper + sys.locale)
- API: Vitest thresholds; migration and user unit tests (SSO, createTaxonomy mocks)
- app.json placeholder updates and related fixes
…ganization validation

- Updated saveOAuthToken to render HTML success and error pages upon OAuth token exchange.
- Introduced organization validation to ensure the correct organization is linked during authorization.
- Normalized Contentstack OAuth URLs to avoid issues with hash-style URLs.
- Added utility functions for building HTML responses and escaping text for safety.
- Enhanced the Login component to handle SSO success and error notifications.
- Added unit tests for new utility functions and updated existing tests for auth controller.
yashin4112 and others added 19 commits June 1, 2026 12:44
…oken handling

- Introduced a new  function to streamline the creation of the marketplace client with proper handling of SSO Bearer tokens.
- Updated , , and  functions to utilize the new client builder.
- Added unit tests to ensure correct routing of SSO Bearer tokens to the SDK's  option instead of .
- Added mounting of app.json in docker-compose.yml for better configuration access.
- Updated setup-docker.sh to check for app.json existence and provide clearer prompts for MySQL host input.
- Introduced a utility function to resolve the app.json path dynamically, improving flexibility in locating the configuration file.
- Refactored auth.service.ts and user.service.ts to utilize the new app configuration path utility.
- Updated tests to reflect changes in user service behavior regarding app organization checks.
…api and upload-api

- Upgraded @contentstack/cli to version 1.61.1 in both api and upload-api.
- Updated @wordpress/block-serialization-default-parser to version 5.46.0 in api.
- Updated @wordpress/block-library to version 9.46.0 and @wordpress/blocks to version 15.19.0 in upload-api.
- Bumped @babel/runtime to version 7.29.2 in upload-api.
- Added new dependency @arraypress/waveform-player version 1.2.1 in upload-api.
…kage-lock.json

- Added yaml package with version 2.4.2 to both package.json and package-lock.json.
- Updated existing yaml dependency version from 1.10.3 to 2.9.0 in package-lock.json, including new metadata for funding and binary.
…yType for better handling of Contentstack UIDs
…nfig

- Extract and map Contentful taxonomies from export; upload-api and mapper integration
- Contentful service: field/widget helpers, taxonomy metadata locale resolution (mapper + sys.locale)
- API: Vitest thresholds; migration and user unit tests (SSO, createTaxonomy mocks)
- app.json placeholder updates and related fixes
@yashin4112 yashin4112 requested a review from a team as a code owner June 1, 2026 07:14
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 18 334 25 ✅ Passed
🟡 Medium Severity 20 3 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

⚠️ Warning: The following vulnerabilities have exceeded their SLA thresholds (days since publication).

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 2 90 / 365 days ⚠️ Warning
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 334
  • Medium without fixes: 3
  • Low without fixes: 0

⚠️ BUILD PASSED WITH WARNINGS - SLA breaches detected for issues without available fixes

Consider reviewing these vulnerabilities when fixes become available.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 18 334 25 ✅ Passed
🟡 Medium Severity 20 3 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

⚠️ Warning: The following vulnerabilities have exceeded their SLA thresholds (days since publication).

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 2 90 / 365 days ⚠️ Warning
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 334
  • Medium without fixes: 3
  • Low without fixes: 0

⚠️ BUILD PASSED WITH WARNINGS - SLA breaches detected for issues without available fixes

Consider reviewing these vulnerabilities when fixes become available.

@umeshmore45 umeshmore45 merged commit 1083c94 into dev Jun 2, 2026
9 checks passed
@umeshmore45 umeshmore45 deleted the hotfix/contentful branch June 2, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants